package com.example.client;

import com.example.common.Result;
import com.example.entity.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "cloud-payment-service")
public interface PaymentClient {
    @PostMapping("/payment/create")
    Result<?> create(@RequestBody Payment payment);

    @GetMapping("/payment/get/{id}")
    Result<?> getPaymentById(@PathVariable("id") Long id);
} 